class Solution {
public:
    bool isPalindrome(int x) {
        if(x<0){return false;}
        if(x==0){return true;}
        string res,ans;
        res=to_string(x);
        ans=res;
        std::reverse(ans.begin(),ans.end());
        if(res==ans){return true;}
        return false;

    }
};